﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace blackhouse.WebNemo.Business.Groups {
    public struct GroupRecordConstructor {

        public IGroupRecord Record;
        public IGroup Group;

        public GroupRecordConstructor(IGroup group, IGroupRecord record) {
            this.Record = record;
            this.Group = group;
        }

        public GroupRecordConstructor(string groupName, int recordId)
            : this(groupName, recordId, CultureInfo.CurrentCulture) {
        }

        public GroupRecordConstructor(string groupName, int recordId, CultureInfo language) {
            Factory factory = Factory.Instance();
            this.Group = factory.GetGroup(groupName);
            this.Record = this.Group.GetGroupRecord(recordId, language);
        }

    }
}
